/**
 *
 * @author c0909h1171
 */
package workshop2;
/*
 * Thread
 * @author C0909H1171
 */
public class BusinessAlive implements Runnable{
    Thread t;
    public BusinessAlive (){
        t = new Thread(this);
        System.out.println("Schedules Variance.: 0");
        System.out.println(t.isAlive());
        t.start();
    }
    public void run(){
        System.out.println("I am in the main and waiting for the business tasks to finish ");
    }
}
/*
 * Main
 * @author C0909H1171
 * @param String args
 */
class BusinessDemo{
    public BusinessDemo(){
        BusinessAlive ba = new BusinessAlive();
    }

    public static void main(String[] args){
        new BusinessDemo();
        
        BusinessAlive bu = new BusinessAlive();
        System.out.println(bu.t.isAlive());

        bu.t.stop();
        System.out.println(bu.t.isAlive());

        bu.t.resume();
        System.out.println(bu.t.isAlive());
    }
}
